/**
 * @Author: 秦建华
 * @Date: 2020/11/24
 * @Last Modified by: max.jianhua
 * @Last Modified time: 2020/11/25
 */
const RouteView = () => import('@/layout/RouteView');
// 异步路由组件加载
const AsyncComponent = __name__ => () => import(`@/pages/${__name__}`);

// 菜单路由
const menuRoutes = [{
  path: '/dealerFinance',
  meta: {
    title: '财务管理',
    icon: 'el-icon-s-cooperation'
  },
  redirect: '/dealerFinance',
  component: RouteView,
  children: [{
      path: '/dealerFinance/RebateRedInvoice',
      meta: {
        title: '返利红票管理'
      },
      redirect: '/dealerFinance/RebateRedInvoice',
      component: RouteView,
      children: [{
        path: '/dealerFinance/RebateRedInvoice/RebateRedInvoiceQuery',
        meta: {
          title: '返利红票查询',
          keepAlive: true
        },
        component: AsyncComponent('dealerFinance/RebateRedInvoice/RebateRedInvoiceQuery')
      }, ]
    },
    {
      path: '/dealerFinance/CRReportManage',
      meta: {
        title: '信用评级报表管理'
      },
      redirect: '/dealerFinance/CRReportManage',
      component: RouteView,
      children: [{
          path: '/dealerFinance/CRReportManage/IncomeReportSubmit',
          meta: {
            title: '利润表提报',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/CRReportManage/IncomeReportSubmit')
        },
        {
          path: '/dealerFinance/CRReportManage/CostReportSubmit',
          meta: {
            title: '成本费用表提报',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/CRReportManage/CostReportSubmit')
        },
        {
          path: '/dealerFinance/CRReportManage/CashFlowReportSubmit',
          meta: {
            title: '现金流量表提报',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/CRReportManage/CashFlowReportSubmit')
        },

        {
          path: '/dealerFinance/CRReportManage/BalanceSheetSubmit',
          meta: {
            title: '资产负债表提报',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/CRReportManage/BalanceSheetSubmit')
        },
      ]
    },
    {
      path: '/dealerFinance/MoneyManage',
      meta: {
        title: '资金管理'
      },
      redirect: '/dealerFinance/MoneyManage',
      component: RouteView,
      children: [{
          path: '/dealerFinance/MoneyManage/DealerAccountQuery',
          meta: {
            title: '经销商账户查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/MoneyManage/DealerAccountQuery')
        },
        {
          path: '/dealerFinance/MoneyManage/AccountDetailsQuery',
          meta: {
            title: '账户明细查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/MoneyManage/AccountDetailsQuery')
        },
      ]
    },
    {
      path: '/dealerFinance/FinanceManage',
      meta: {
        title: '三方融资管理'
      },
      redirect: '/dealerFinance/FinanceManage',
      component: RouteView,
      children: [{
          path: '/dealerFinance/FinanceManage/FinanceApply',
          meta: {
            title: '三方融资申请',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/FinanceManage/FinanceApply')
        },
        {
          path: '/dealerFinance/FinanceManage/FinanceQuery',
          meta: {
            title: '三方融资查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/FinanceManage/FinanceQuery')
        },
        {
          path: '/dealerFinance/FinanceManage/InvoiceNumberQuery',
          meta: {
            title: '三方票号查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/FinanceManage/InvoiceNumberQuery')
        },
        {
          path: '/dealerFinance/FinanceManage/LicenseBindingQuery',
          meta: {
            title: '车证绑定查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/FinanceManage/LicenseBindingQuery')
        },
        {
          path: '/dealerFinance/FinanceManage/VehicleStorageAgeRemind',
          meta: {
            title: '三方车辆库龄提醒',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/FinanceManage/VehicleStorageAgeRemind')
        },
      ]
    },
    {
      path: '/dealerFinance/RebateManage',
      meta: {
        title: '返利管理'
      },
      redirect: '/dealerFinance/RebateManage',
      component: RouteView,
      children: [{
          path: '/dealerFinance/RebateManage/RebatePoolQuery',
          meta: {
            title: '返利池查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/RebateManage/RebatePoolQuery')
        },
        {
          path: '/dealerFinance/RebateManage/RebateDetailsQuery',
          meta: {
            title: '返利明细查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/RebateManage/RebateDetailsQuery')
        },
        {
          path: '/dealerFinance/RebateManage/ChildrenCapitalPoolQuery',
          meta: {
            title: '返利子项目资金池查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/RebateManage/ChildrenCapitalPoolQuery')
        },
        {
          path: '/dealerFinance/RebateManage/ChildrenValidPeriodQuery',
          meta: {
            title: '返利子项目有效期查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/RebateManage/ChildrenValidPeriodQuery')
        },
        {
          path: '/dealerFinance/RebateManage/RebateStatementCommit',
          meta: {
            title: '资金返利对账表确认',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/RebateManage/RebateStatementCommit')
        },
        {
          path: '/dealerFinance/RebateManage/RebateStatementQuery',
          meta: {
            title: '资金返利对账表查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/RebateManage/RebateStatementQuery')
        },
      ]
    },
    {
      path: '/dealerFinance/InvoiceManage',
      meta: {
        title: '总部发票管理'
      },
      redirect: '/dealerFinance/InvoiceManage',
      component: RouteView,
      children: [{
          path: '/dealerFinance/InvoiceManage/GoldenTaxInvoiceQuery',
          meta: {
            title: '金税发票查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/InvoiceManage/GoldenTaxInvoiceQuery')
        },
        {
          path: '/dealerFinance/InvoiceManage/SalesListQuery',
          meta: {
            title: '销货清单查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/InvoiceManage/SalesListQuery')
        },
        {
          path: '/dealerFinance/InvoiceManage/AddresseeInfoMaintian',
          meta: {
            title: '收件人信息维护',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/InvoiceManage/AddresseeInfoMaintian')
        },
        {
          path: '/dealerFinance/InvoiceManage/InvoiceMailInfoConfirm',
          meta: {
            title: '发票邮寄信息确认',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/InvoiceManage/InvoiceMailInfoConfirm')
        },
        {
          path: '/dealerFinance/InvoiceManage/InvoiceSign',
          meta: {
            title: '发票签收',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/InvoiceManage/InvoiceSign')
        },
        {
          path: '/dealerFinance/InvoiceManage/InvoiceMailQuery',
          meta: {
            title: '发票邮寄查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/InvoiceManage/InvoiceMailQuery')
        },
        {
          path: '/dealerFinance/InvoiceManage/OldInvoiceReturnRegist',
          meta: {
            title: '旧票退回登记',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/InvoiceManage/OldInvoiceReturnRegist')
        },
      ]
    },
    {
      path: '/dealerFinance/ShopInvoiceManage',
      meta: {
        title: '店端票务管理'
      },
      redirect: '/dealerFinance/ShopInvoiceManage',
      component: RouteView,
      children: [{
          path: '/dealerFinance/ShopInvoiceManage/TaxInfoQuery',
          meta: {
            title: '税盘信息查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/ShopInvoiceManage/TaxInfoQuery')
        },
        {
          path: '/dealerFinance/ShopInvoiceManage/SalesInvoice',
          meta: {
            title: '机动车统一销售发票',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/ShopInvoiceManage/SalesInvoice')
        },
        {
          path: '/dealerFinance/ShopInvoiceManage/NormalInvoice',
          meta: {
            title: '增值税普通发票',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/ShopInvoiceManage/NormalInvoice')
        },
        {
          path: '/dealerFinance/ShopInvoiceManage/SpecialInvoice',
          meta: {
            title: '增值税专用发票',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/ShopInvoiceManage/SpecialInvoice')
        },
        {
          path: '/dealerFinance/ShopInvoiceManage/InvoicingQuery',
          meta: {
            title: '开票查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerFinance/ShopInvoiceManage/InvoicingQuery')
        },
      ]
    },
    // {
    //   path: '/dealerFinance/PriceDiscountManage',
    //   meta: {
    //     title: '价格折扣管理'
    //   },
    //   redirect: '/dealerFinance/PriceDiscountManage',
    //   component: RouteView,
    //   children: []
    // }
  ]
}];
export default menuRoutes;
